﻿@model Applica.Models.SponsorInputs345xModel  
<div class="welcome_tab">
  <div class="left_part">
                    <h4>
                                        My Screen</h4>
                                    <div class="welcome_img_phone">
                                   
                                           <img src="@Url.Content("~/images/my-screen.png")" alt=""  class="phoneImageMyscreen"/>
                                         <img style="display: none" src="@Url.Content("~/images/mobileApp/screenshots android/my-screen-android.png")" alt=""  class="phoneImageMyscreen"/>
              <img src="@Url.Content("~/images/mobileApp/see as android.png")" alt=""  class="phoneImageMyscreen1 phoneImageandroid"/>
            <img style="display: none" src="@Url.Content("~/images/mobileApp/see as iphone.png")" alt=""  class="phoneImageMyscreen1 phoneImageandroid"/>
            <script>
                $(".phoneImageMyscreen1").click(function () {
                    $(".phoneImageMyscreen1").toggle();
                    $(".phoneImageMyscreen").toggle();
                });
            </script>

                                    </div>
                                </div>
                                <div class="right_part">
                                    <p>
                                        Your 'My Screen' is a screen completely dedicated to you and the messages, image,
                                        and links that you want to provide your customers.
                                        
                                    </p>
                                     <div  id="spnMessagemyscreen"></div>
                                    <div class="up_data">
                                           <div class="up_data-img-upload">
                 <label>IMAGE</label></div>
                                        <div class="upload-image-div">
                   <div class="user_img-l">
               
                    <img id="imglogo1" src='@Url.Content("~/sponsor_iphone_images/" + Model.ilogo_pic)' alt="" />
                  
            </div>

                <div class="img-upload-data">
                <div class="upload_btn">

                    <input id="fileupload1" type="file" name="files[]" multiple>
                </div>
                <div class="progress">
                    <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
                        <span class="sr-only">0% complete</span>
                    </div>
                </div>
                     @if (Model.ilogo_pic=="Default.png")
            {
                @:<div id="divRestore1" style="display: none">
            } 
            else
            {
                @: <div id="divRestore1" style="display: block">
            }

            <span class="image-save">Image saved</span>
                
                 @using (Ajax.BeginForm("restoreFile", "Iphone", new AjaxOptions
                 {
                     HttpMethod = "POST",
                     LoadingElementId = "loaderdefaultimage",
                     InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace,
                     UpdateTargetId = "data",
                     OnSuccess = "OnSuccessDefault"

                 }))
                 { 
                    @Html.HiddenFor(model => model.Sponsor_ID)
                <span id="data" > </span>
                     <a class=".sendmail" style="text-decoration:underline;color:red;" href="#" id="btnDefaultImageRestore">restore default image</a>@*
                   <input type="submit" value="Restore default image" id="btnDefaultImageRestore"/>*@  <div style="display: none" id="loaderdefaultimage">
                <img src="@Url.Content("~/images/ajax-loader.gif")" /></div>
                      
                 }
                <script>
                    function OnSuccessDefault(data) {
                        // alert(data.name);
                        $("#imglogo1").attr("src", '../sponsor_iphone_images/' + data.name);
                        $("#divRestore1").css("display", "none");
                    }

                </script>

            </div>

                </div>
            
            <style>


                .progress-bar {
    background-image: linear-gradient(to bottom, #428BCA 0px, #3071A9 100%);
    background-repeat: repeat-x;
}
 .sr-only {
    border: 0 none;
    clip: rect(0px, 0px, 0px, 0px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}
 .progress-bar {
    background-color: #428BCA;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15) inset;
    color: #FFFFFF;
    float: left;
    font-size: 12px;
    height: 100%;
    text-align: center;
    transition: width 0.6s ease 0s;
    width: 0;
}
 .progress {
    background-image: linear-gradient(to bottom, #EBEBEB 0px, #F5F5F5 100%);
    background-repeat: repeat-x;
}
.progress {
    background-color: #F5F5F5;
    border-radius: 4px 4px 4px 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
    height: 20px;
    margin-bottom: 10px;
    margin-top: 10px;
    overflow: hidden;
}
            </style>
           
            <div class="img-upload-data">
              
                <div>
                

              <div style="display:none"> <div class="file_name"></div>

                <div class="file_type"></div>

                <div class="file_size"></div>
                <div class="file_imglogo"></div></div> 
           
           
</div> </div></div>
            <div class="info_icon">
                <a href="#" class="tooltip">
                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                    <span>
                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/welcome screen/image or logo.png")" alt="" />
                        <p class="user_cont">
                            You can upload an image that will be displayed here, and it will also be displayed
                                                                on the Admin Link, My Screen, Setup Done Screen, and your Banner Message.
                        </p>
                    </span></a>
            </div>
        </div>
                                 @using (Ajax.BeginForm("Update", "Iphone", new AjaxOptions
                {
                    HttpMethod = "POST",
                    LoadingElementId = "loaderscreen",
                    OnSuccess = "successmyscreen"
                  
                }))
               {
                                      <div style="top: 80%; position: absolute; left: 50%;display:none" id="loaderscreen" ><img src="@Url.Content("~/images/ajax-loader.gif")" /></div>
                                     @Html.HiddenFor(model => model.sponsor)
                                    <div class="upload_view">
                                
                                       
                                           <br />
                                         <p class="horizental-line">
                   <img src="@Url.Content("~/images/line.jpg")" alt="Horizentalline" />

               </p><div class="up_data">
                                           <label>TEXT</label>
                                           
                                         </div>
                                       
                                         <div class="up_data">
                                            <label>
                                                Company Name:</label>
                                           @Html.TextBoxFor(model => model.icompany_name)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/name line 1.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                        <div class="up_data">
                                            <label>
                                                Tag Line:</label>
                                             @Html.TextAreaFor(model => model.itagline)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/message line 1.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                        <div class="up_data">
                                            <label>
                                                Message:
                                               </label>
                                            @Html.TextAreaFor(model => model.imessage_myscreen)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/message line 2.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                        <div class="up_data">
                                            <label>
                                               Your Name:</label>
                                            @Html.TextBoxFor(model => model.iname_line)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/name line 2.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                        <div class="up_data">
                                            <label>
                                                Phone:</label>
                                            @Html.TextBoxFor(model => model.iphone_number)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/phone line.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                        <div class="up_data">
                                            <label>
                                                Email:</label>
                                            @Html.TextBoxFor(model => model.iemail_address)
                                            
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/email line.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                        <div class="up_data">
                                            <label>
                                                Web Address:</label>
                                             @Html.TextBoxFor(model => model.iwebsite)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/web address.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                            
                                             <br />
                                         <div class="up_data"> 
 <label>ICON LINKS</label>
</div>




                                        <div class="up_data">
                                            <label>
                                                Phone Number:</label>
                                             @Html.TextBoxFor(model => model.icon_phone_number)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/web address.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                            <div class="up_data">
                                            <label>
                                                Email Address:</label>
                                             @Html.TextBoxFor(model => model.icon_email_address)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/web address.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                              <div class="up_data">
                                            <label>
                                                Web Address:</label>
                                             @Html.TextBoxFor(model => model.icon_web_address)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/web address.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                            <div class="up_data">
                                            <label>
                                                Facebook Address:</label>
                                             @Html.TextBoxFor(model => model.ifacebook)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/web address.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                             <div class="up_data">
                                            <label>
                                                Twitter Address:</label>
                                             @Html.TextBoxFor(model => model.itwitter)
                                            <div class="info_icon">
                                                <a href="#" class="tooltip">
                                                    <img src="@Url.Content("~/images/info_icon.png")" alt="" />
                                                    <span style="margin-left: -210px; margin-top: 33px;">
                                                        <img class="callout" src="@Url.Content("~/images/mobileApp/tool tips iphone/my screen/web address.png")" alt="" />
                                                        <p class="user_cont">
                                                            Your “My Screen” is a screen completely dedicated to you and the messages, image,
                                                            and links that you want to provide your customers.
                                                        </p>
                                                    </span></a>
                                            </div>
                                        </div>
                                           </div>
                                   
                                    <div class="save_btn"><br /><br />
                                        <input type="submit" value="" id="btnSubmit"/>  

                                    </div>
                                }
                                </div>
                            </div>
     <script type="text/javascript">
         $(document).ready(function () {

             $('#fileupload1').fileupload({
                 dataType: 'json',
                 url: '/Iphone/UploadFiles',
                 autoUpload: true,
                 formData: { id: $('#Sponsor_ID').val() },
                 done: function (e, data) {

                     $('.file_name').html(data.result.name);
                     $('.file_type').html(data.result.type);
                     $('.file_size').html(data.result.size);
                     $('.file_imglogo').html('sponsor_iphone_images/' + data.result.path);
                    
                     $("#imglogo1").attr("src", "../sponsor_iphone_images/" + data.result.path + "?" +@DateTime.Now.Ticks.ToString() +"");
                    $("#divRestore1").css("display", "block");
                    $("#loaderdefaultimage").css("display", "none");
                    $('.progress').hide();
                }
            }).on('fileuploadprogressall', function (e, data) {
                $('.progress').show();
                var progress = parseInt(data.loaded / data.total * 100, 10);
                $('.progress .progress-bar').css('width', progress + '%');
            });


        });
        $_blockDelete = false;
        $('#btnDefaultImageRestore').die('click').live('click', function () {
            var rconfirm = confirm('Are you sure?');
            if (rconfirm) {
                $('#form0').submit();
            }
        });
    </script>